<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<%@ include file="/common/taglibs.jsp" %>
<%@page contentType="text/html;charset=UTF-8" %>
<%@page pageEncoding="UTF-8" %>
<html>
<head>
    <title>销售终端管理</title>
            
    <script type="text/javascript" src="${yui_server_root}/2.9.0/build/history/history-min.js"></script>
    <script type="text/javascript" src="${yui_server_root}/2.9.0/build/json/json-min.js"></script>
    <script type="text/javascript" src="${yui_server_root}/2.9.0/build/datasource/datasource-min.js"></script>
    <script type="text/javascript" src="${yui_server_root}/2.9.0/build/datatable/datatable-min.js"></script>
    <script type="text/javascript" src="${yui_server_root}/2.9.0/build/paginator/paginator-min.js"></script>
    
    <script type="text/javascript" src="${static_server_root}/static/scripts/jquery/jquery-1.8.3.min.js"></script>
    <script type="text/javascript" src="${static_server_root}/static/scripts/validator/languages/jquery.validationEngine-lang.js"  charset="utf-8"></script>
    <script type="text/javascript" src="${static_server_root}/static/scripts/validator/jquery.validationEngine.js" charset="utf-8"></script>
    <link type="text/css" rel="stylesheet" href="${static_server_root}/static/styles/validator/validationEngine.jquery.css" />    
    <script type="text/javascript" src="${static_server_root}/static/scripts/address/address_selector.js"></script>
    <script type="text/javascript" src="${static_server_root}/static/scripts/sales/salesterminal_edit.js"></script>
</head>
<body>
	<div class="yui-g">
		<fieldset>
			<legend>销售终端管理(${action})</legend>
			<div class="operator-btn">
				<div>
	                <div class="operator-btn">
	                	<input type="button" id="returnList" name="returnList" value="返回">
	                    <input type="button" id="refreshRecord" name="refreshRecord" value="刷新">
	                    <input type="button" id="saveRecord" name="saveRecord" value="保存">
	                </div>
                </div>
            </div>
		</fieldset>            
            <div class="edit-panel">
				<form:form modelAttribute="ostDTO" method="post" action="/agent/salesterminal/saveorupdate/?action=${action}" id="salesterminalForm" enctype="multipart/form-data">
					<form:hidden path="id" id="id" />
					<form:hidden path="province" id="province" />
					<table cellspacing="0" class="yui-skin-sam">
						<c:if test="${action == 'edit'}">
						<tr>
							<td>ID ：</td>
							<td>${ostDTO.id}</td>
						</tr>
						</c:if>
						<tr>
							<td><label for="city">城市 ：</label></td>
							<td>								
							    <form:select path="city" id="city" name="city">
							    	<option value="">请选择城市</option>
							    	<c:if test="${empty ostDTO.city == false}">
							    		<option value="${ostDTO.city}" selected >${ostDTO.city}</option>
							    	</c:if>							    	
							    </form:select>
							</td>
						</tr>
						<tr>
							<td><label for="district">市辖区/县级市/县 ：</label></td>
							<td>							    
							    <form:select path="district" id="district" name="district">
							    	<option value="">请选则区县</option>
							    	<c:if test="${empty ostDTO.district == false}">							    	
							    		<option value="${ostDTO.district}" selected >${ostDTO.district}</option>
							    	</c:if>
							    </form:select>							    
							</td>
						</tr>
						<tr>
							<td><label for="terminalName">终端名称：</label></td>
							<td>
							    <form:input path="terminalName" id="terminalName" name="terminalName" size="30"/>
							</td>
						</tr>																								
						<tr>
							<td><label for="terminalType">终端类型 ：</label></td>
							<td>
								<form:select path="terminalType" id="terminalType" name="terminalType">
			                   		<option value="">---</option>
			                    	<c:forEach items="${ostDTO.terminalTypeArray}" var="tt" varStatus="status">											
										<option value="${tt}" <c:if test="${ostDTO.terminalType == tt}"> selected </c:if>>${tt.name}</option>
			                    	</c:forEach>		                            
								</form:select>
							</td>
						</tr>
						<tr>
							<td><label for="terminalType">终端级别 ：</label></td>
							<td>
								<form:select path="terminalLevel" id="terminalLevel" name="terminalLevel">
			                   		<option value="">---</option>
			                    	<c:forEach items="${ostDTO.terminalLevelArray}" var="tl" varStatus="status">											
										<option value="${tl}" <c:if test="${ostDTO.terminalLevel == tl}"> selected </c:if>>${tl.name}</option>
			                    	</c:forEach>		                            
								</form:select>
							</td>
						</tr>
						<tr>
							<td><label for="isCoreTerminal">是核心终端 ：</label></td>
							<td>
							    <form:select path="isCoreTerminal" id="isCoreTerminal" name="isCoreTerminal">
							    	<option value="">---</option>
							    	<option value="true" <c:if test="${ostDTO.isCoreTerminal == true}">selected </c:if>>是</option>
							    	<option value="false" <c:if test="${ostDTO.isCoreTerminal == false}">selected </c:if>>否</option>
							    </form:select>
							</td>
						</tr>
						<tr>
							<td><label for="terminalAddress">终端地址 ：</label></td>
							<td>
							    <form:input path="terminalAddress" id="terminalAddress" name="terminalAddress" size="30"/>
							</td>
						</tr>
						<tr>
							<td><label for="channelMode">渠道模式 ：</label></td>
							<td>
							    <form:select path="channelMode" id="channelMode" name="channelMode">
							    	<option value="">---</option>
			                    	<c:forEach items="${ostDTO.channelModeArray}" var="cm" varStatus="status">											
										<option value="${cm}" <c:if test="${ostDTO.channelMode == cm}"> selected</c:if>>${cm.name}</option>
			                    	</c:forEach>
							    </form:select>
							</td>
						</tr>
						<tr>
							<td><label for="salesYear">销售年度 ：</label></td>
							<td>							    
							    <form:select path="salesYear" id="salesYear" name="salesYear">
							    	<option value="">---</option>
			                    	<c:forEach items="${ostDTO.salesYearArray}" var="sy" varStatus="status">											
										<option value="${sy}" <c:if test="${ostDTO.salesYear == sy}"> selected</c:if>>${sy}</option>
			                    	</c:forEach>
							    </form:select>							    
							</td>
						</tr>
						<tr>
							<td><label for="salesAmount">销售额（万元） ：</label></td>
							<td>
							    <form:input path="salesAmount" id="salesAmount" name="salesAmount" size="30" cssClass="validate[optional,custom[number]]"/>
							</td>
						</tr>
						<tr>
							<td><label for="isCompositeTerminal">是复合终端 ：</label></td>
							<td>
							    <form:select path="isCompositeTerminal" id="isCompositeTerminal" name="isCompositeTerminal">
							    	<option value="">---</option>
							    	<option value="true" <c:if test="${ostDTO.isCompositeTerminal == true}">selected </c:if>>是</option>
							    	<option value="false" <c:if test="${ostDTO.isCompositeTerminal == false}">selected </c:if>>否</option>
							    </form:select>
							</td>
						</tr>
						<tr>
							<td><label for="compositeWith">复合品牌 ：</label></td>
							<td>
							    <form:select path="compositeWith" id="compositeWith" name="compositeWith">
							    	<option value="">---</option>
			                    	<c:forEach items="${ostDTO.compositeWithArray}" var="cw" varStatus="status">											
										<option value="${cw}" <c:if test="${ostDTO.compositeWith == cw}"> selected</c:if>>${cw.name}</option>
			                    	</c:forEach>
							    </form:select>
							</td>
						</tr>
						<tr>
							<td><label for="terminalPosition">终端位置 ：</label></td>
							<td>
							    <form:select path="terminalPosition" id="terminalPosition" name="terminalPosition">
							    	<option value="">---</option>
			                    	<c:forEach items="${ostDTO.terminalPositionArray}" var="tp" varStatus="status">											
										<option value="${tp}" <c:if test="${ostDTO.terminalPosition == tp}"> selected</c:if>>${tp.name}</option>
			                    	</c:forEach>
							    </form:select>
							</td>
						</tr>
						<tr>
							<td><label for="terminalLayout">店面布局 ：</label></td>
							<td>
							    <form:select path="terminalLayout" id="terminalLayout" name="terminalLayout">
							    	<option value="">---</option>
			                    	<c:forEach items="${ostDTO.terminalLayoutArray}" var="tl" varStatus="status">											
										<option value="${tl}" <c:if test="${ostDTO.terminalLayout == tl}"> selected</c:if>>${tl.name}</option>
			                    	</c:forEach>
							    </form:select>
							</td>
						</tr>
						<tr>
							<td><label for="areaSize">当前面积 ：</label></td>
							<td>
							    <form:select path="areaSize" id="areaSize" name="areaSize">
							    	<option value="">---</option>
			                    	<c:forEach items="${ostDTO.areaSizeArray}" var="as" varStatus="status">											
										<option value="${as}" <c:if test="${ostDTO.areaSize == as}"> selected</c:if>>${as.name}</option>
			                    	</c:forEach>
							    </form:select>
							</td>
						</tr>
						<tr>
							<td><label for="ozingBarCount">柜台数量 ：</label></td>
							<td>
							    <form:select path="ozingBarCount" id="ozingBarCount" name="ozingBarCount">
							    	<option value="">---</option>
			                    	<c:forEach items="${ostDTO.ozingBarCountArray}" var="obc" varStatus="status">											
										<option value="${obc}" <c:if test="${ostDTO.ozingBarCount == obc}"> selected</c:if>>${obc.name}</option>
			                    	</c:forEach>
							    </form:select>
							</td>
						</tr>
						<tr>
							<td><label for="hasBackground">有背景 ：</label></td>
							<td>
							    <form:select path="hasBackground" id="hasBackground" name="hasBackground">
							    	<option value="">---</option>
							    	<option value="true" <c:if test="${ostDTO.hasBackground == true}">selected </c:if>>是</option>
							    	<option value="false" <c:if test="${ostDTO.hasBackground == false}">selected </c:if>>否</option>
							    </form:select>
							</td>
						</tr>
						<tr>
							<td><label for="storeManager">店长 ：</label></td>
							<td>
							    <form:input path="storeManager" id="storeManager" name="storeManager" size="30"/>
							</td>
						</tr>
						<tr>
							<td><label for="terminalPhone">电话 ：</label></td>
							<td>
							    <form:input path="terminalPhone" id="terminalPhone" name="terminalPhone" size="30" />
							</td>
						</tr>																																																																								
					</table>                	
            	</form:form>
            </div>	
	</div>
</body>
</html>
